package com.aaa.vegetablemarketexpress.service;

import com.aaa.vegetablemarketexpress.entity.Shop;
import com.aaa.vegetablemarketexpress.entity.ShopAuditStatusCount;
import com.aaa.vegetablemarketexpress.entity.ShopStatusCount;
import com.aaa.vegetablemarketexpress.util.Page;
import com.aaa.vegetablemarketexpress.util.Result;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @FileName: ShopService
 * @Description: 店铺业务逻辑接口
 * @Author: qxh
 * @CreateTime: 2025/9/10
 * @Version: 1.0.0
 */
@Service
public interface ShopService {
    /**
     * 根据店铺ID查询店铺信息
     * @param shopId
     * @return
     */
    Shop selectShopById(Long shopId);

    /**
     * 分页查询店铺列表
     * @param page
     * @return
     */
    PageInfo selectShopList(Page<Shop> page);

    /**
     * 添加店铺
     * @param shop
     * @return
     */
    Shop insertShop(Shop shop);

    /**
     * 修改店铺
     * @param shop
     * @return
     */
    int updateShop(Shop shop);

    /**
     * 删除店铺（逻辑删除）
     * @param shopId
     * @return
     */
    int deleteShopById(Long shopId);

    /**
     * 检查店铺名称是否唯一
     * @param shop
     * @return
     */
    String checkShopNameUnique(Shop shop);

    /**
     * 审核店铺
     * @param shop
     * @return
     */
    int auditShop(Shop shop);
    /**
     * 根据用户ID查询店铺（商家与店铺一对一关联）
     */
    Shop getShopByUserId(Long userId);

    /**
     * 店铺审核成功列表
     * @param page
     * @return
     */
    PageInfo selectShopListAuditStatus(Page<Shop> page);

    /**
     * 获取所有店铺列表
     * @return
     */
    List<Shop> getAllShops();
    /**
     * 获取店铺状态统计
     * @return
     */
    List<ShopStatusCount> getShopStatusCount();
    /**
     * 获取店铺审核状态统计
     * @return
     */
    List<ShopAuditStatusCount> getShopAuditStatusCount();
    /**
     * 获取店铺数量
     * @return
     */
    Long countShops();
}
